package com.gxa.common;

/**
 * @author MacieSerenity
 */

public enum Status {
    /**
     * 所有返回状态的集合
     */
    SYSTEM_ERROR(500, "系统开小差了！"),

    SUCCESS(200, "操作成功！"),

    USER_LOGOUT(200, "退出登录成功！"),
    LOGIN_FAILED(1001, "登陆失败！账号或密码有误！"),

    NOT_LOGIN_YET(1002, "用户未登录！"),
    TOKEN_EXPIRED(1005, "Token已过期!"),
    TOKEN_VERIFICATION_FAILED(1006, "Token验证失败!"),
    NULL_TOKEN(1006, "Token为空!"),
    TOKEN_IS_ILLEGAL(1007, "Token不合法！"),
    USER_LOCKED(1008, "用户已被锁定！无法登陆，请联系管理员"),
    USER_IDENTIFY_ERROR(1009, "用户身份验证失败！请联系管理员！"),

    VERIFICATION_CODE_ERROR(1010, "验证码错误"),
    NON_VERIFICATION_CODE(1011, "没有输入验证码，请求被拒绝"),
    BAD_REQUEST_PARAM(1012, "错误的请求参数"),
    BAD_PAGE_PARAM(1013, "错误的分页请求参数，请检查是否传入了错误的参数，可能参数过大或者小于1"),
    BAD_QUERY_PARAM(1014, "错误的查询参数"),
    ALREADY_HAVE_APPOINTMENT(1015, "已经有预约，无法新增预约"),
    DONT_HAVE_THIS_USER(1016, "没有这个医生");
    private Integer code;
    private String msg;

    Status(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
